package abc.red.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @ClassName User
 * @Author YiXia
 * @Date 2024/1/11 11:07
 * @Version 1.0
 * @Description TODO
 **/


@Data
@AllArgsConstructor
@NoArgsConstructor
public class Manager {


    @TableId(type= IdType.AUTO)
    private Long id;
    private String name;
    private String password;
    private String realName;
    private String sex;
    private String phone;
    /**
     * 0冻结，1启用
     */
    private int status;
    /**
     * 0超级管理员，1普通管理员，2供货商，3消费者
     */
    private int level;


    /*插入时填充*/
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /*插入与更新时*/
    @TableField(fill=FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

}
